package 栈;

public class TreeNode {

        public int val;
        public TreeNode left;
        public TreeNode right;
        public TreeNode() {}
        public TreeNode(int val) { this.val = val; }
        public TreeNode(int val, TreeNode left, TreeNode right) {
            this.val = val;
            this.left = left;
            this.right = right;
        }

        public static TreeNode getNode(){
            TreeNode treeNode1=new TreeNode(1);
            TreeNode treeNode2=new TreeNode(2);
            TreeNode treeNode3=new TreeNode(3);
            TreeNode treeNode4=new TreeNode(4);
            TreeNode treeNode5=new TreeNode(5);
            TreeNode treeNode6=new TreeNode(6);
            TreeNode treeNode7=new TreeNode(7);
            treeNode1.left=treeNode2;
            treeNode1.right=treeNode3;
            treeNode2.left=treeNode4;
            treeNode2.right=treeNode5;
            treeNode3.left=treeNode6;
            treeNode3.right=treeNode7;
            TreeNode treeNode44=new TreeNode(44);
            treeNode4.right=treeNode44;
            return treeNode1;
        }

}
